import { post,get } from "../http/index";
//注册
export const SignUp = (user) => post(`/user/add`, user);

//登录 
export const loginIn = (user) => post(`/user/login`, user);
//------------------------信息修改-------------------------
//修改密码
export const updatePassword  = (params) => post(`/user/update_password`,params)
//修改个人信息
export const updateInfo  = (params) => post(`/user/update_info`,params)



//------------------------我的订单-------------------------
//查询待付款订单
export const selectOrderByUserId = (pn,uid,status) => get(`/order/selectOrderByStatus?pn=${pn}&uid=${uid}&status=${status}`);

//-------------------------师傅---------------------------
//升级为师傅
export const changeMaster = (master) => post(`/master/add`, master);
//查询所有师傅会做的菜  以及分页
export const getMasterCooking = (pn,mid) => get(`/master/selectCooking?pn=${pn}&mid=${mid}`);
//修改师傅会做的菜
export const updateDishAndMaster  = (params) => post(`/master/update_dishAndmaster`,params)
//删除一个菜品
export const deleteHDish = (id) => get(`/master/delete_dish?id=${id}`);
//增加师傅会做的菜
export const commitInfo_Dish  = (params) => post(`/master/insert_dish`,params)